using System;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Sample.Web
{
    public partial class Default : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.IsPostBack) return;
            this.DefinePageItems();
        }

        #region Methods

        protected void DefinePageItems()
        {
            this.ltrSampleReport.Text = this.GetReport();
            this.ltrSampleView.Text = this.GetView();
        }

        private string GetReport()
        {
            string externalParameter = "Hello! I'm external parameter.";

            PersonReport report = new PersonReport(externalParameter);
            return report.Render();
        }

        private string GetView()
        {
            PersonView view = new PersonView("Leco"); // Anyone name from List.
            return view.Render();
        }

        #endregion
    }
}